Class Flow.InventoryItem

Represents the properties of an object as it appears in the inventory.

Functions

InventoryItem(nameKey, objectID, yOffset, scale, rot, axis, meshBits, action) Create an InventoryItem.


Functions

InventoryItem(nameKey, objectID, yOffset, scale, rot, axis, meshBits, action)
Create an InventoryItem.

Parameters:

  • nameKey string key for the item's (localised) name.
    Corresponds to an entry in strings.lua.
  • objectID ObjID object ID of the inventory object to change
  • yOffset float y-axis offset (positive values move the item down).
    A value of about 100 will cause the item to display directly below its usual position.
  • scale float item size (1 being standard size).
    A value of 0.5 will cause the item to render at half the size, and a value of 2 will cause the item to render at twice the size.
  • rot Rotation rotation around x, y, and z axes
  • axis RotationAxis Axis to rotate around when the item is observed at in the inventory.
    Note that this is entirely separate from the rot field described above. Must one of the following:

    X
    Y
    Z
    

    e.g. myItem.rotAxisWhenCurrent = RotationAxis.X

  • meshBits int Not currently implemented (will have no effect regardless of what you set it to)
  • action ItemAction is this usable, equippable, combineable or examinable?
    Must be one of:

    EQUIP
    USE
    COMBINE
    EXAMINE
    

    e.g. myItem.action = ItemAction.EXAMINE

Returns:

    InventoryItem an InventoryItem
generated by TEN-LDoc (a fork of LDoc 1.4.6)